package com.keshan.mapper;

import com.keshan.pojo.Sleep;
import com.keshan.pojo.SleepEverydayData;

import java.util.Date;
import java.util.List;

import com.keshan.pojo.SleepExample;
import com.keshan.pojo.SleepHide;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

public interface SleepMapper {
    int countByExample(SleepExample example);

    int deleteByExample(SleepExample example);

    int deleteByPrimaryKey(Integer id);

    int insert(Sleep record);

    int insertSelective(Sleep record);

    List<Sleep> selectByExample(SleepExample example);


    Sleep selectByPrimaryKey(Integer id);

    int updateByExampleSelective(@Param("record") Sleep record, @Param("example") SleepExample example);

    int updateByExample(@Param("record") Sleep record, @Param("example") SleepExample example);

    int updateByPrimaryKeySelective(Sleep record);

    int updateByPrimaryKey(Sleep record);

    List<SleepHide> selectHideByExample(@Param("beginTime") Date beginTime,
                                        @Param("endTime")Date endTime,
                                        @Param("username")String username);

    List<SleepEverydayData> selectSleepEverydayData(@Param("beginTime") Date beginTime,
                                                    @Param("endTime")Date endTime,
                                                    @Param("username")String username);
}